/*package com.hsnn.medstgmini.base.dict.model;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.persistence.Transient;
*//**
 * 
 * @category 剂型字典日志
 * @author xugp
 * @date 2015年6月9日 下午3:12:51
 *//*
@Entity
@Table(name = "dic_drugform_log")
public class DicDrugformLog {

	private String logId;
	private String formId;
	private String formCode;
	private String formName;
	private int status;
	private Date updDatetime;
	private String updUser;
	private int sortId;
	private DicDrugform father;
	private String fatherDrugformCode;
	private String fatherDrugformName;

	
	
	@Id
	@Column(name = "log_id")
	public String getLogId() {
		return logId;
	}
	public void setLogId(String logId) {
		this.logId = logId;
	}
	
	@Column(name = "form_id")
	public String getFormId() {
		return formId;
	}
	public void setFormId(String formId) {
		this.formId = formId;
	}
	@Column(name = "form_code")
	public String getFormCode() {
		return formCode;
	}
	public void setFormCode(String formCode) {
		this.formCode = formCode;
	}
	@Column(name = "form_name")
	public String getFormName() {
		return formName;
	}
	public void setFormName(String formName) {
		this.formName = formName;
	}
	@Column(name = "status")
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}

	
	@Column(name = "upd_datetime")
	public Date getUpdDatetime() {
		return updDatetime;
	}
	public void setUpdDatetime(Date updDatetime) {
		this.updDatetime = updDatetime;
	}
	@Column(name = "upd_user")
	public String getUpdUser() {
		return updUser;
	}
	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}
	@Column(name = "sort_id")
	public int getSortId() {
		return sortId;
	}
	public void setSortId(int sortId) {
		this.sortId = sortId;
	}
	@javax.persistence.ManyToOne(cascade = { CascadeType.ALL })
	@JoinColumn(name = "father_id")
	public DicDrugform getFather() {
		return father;
	}
	public void setFather(DicDrugform father) {
		this.father = father;
	}
	@Transient
	public String getFatherDrugformCode() {
		return fatherDrugformCode;
	}
	public void setFatherDrugformCode(String fatherDrugformCode) {
		this.fatherDrugformCode = fatherDrugformCode;
	}
	@Transient
	public String getFatherDrugformName() {
		return fatherDrugformName;
	}
	public void setFatherDrugformName(String fatherDrugformName) {
		this.fatherDrugformName = fatherDrugformName;
	}

	

	
}
*/
package com.hsnn.medstgmini.base.dict.model;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * 剂型字典 维护记录model
 * @author hss@njhsnn
 * 2015年6月9日
 */
@Entity
@Table(name = "dic_drugform_log")
public class DicDrugformLog implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -6854411293823449469L;
	private String logId;//日志id
	private String formId;//剂型id
	private String formCode;//剂型编码
	private String formName;//剂型
	private String fatherId;//父级id
	private Integer status;//状态
	private Date updDatetime;//更新时间
	private String updUser;//更新人
	private Short sortId;//排序id
	
	private String fatherFormCode;//父类剂型编码
	private String fatherFormName;//父类剂型
	private String literUpdDttm;
	public String getLiterUpdDttm() {
		return literUpdDttm;
	}
	public void setLiterUpdDttm(String literUpdDttm) {
		this.literUpdDttm = literUpdDttm;
	}
	private String detail;
	
	public String getDetail() {
		return detail;
	}
	public void setDetail(String detail) {
		this.detail = detail;
	}

	private DicDrugform dicDrugformCode;//剂型维护日志对象
	
	private long count;
	// Constructors

	/** default constructor */
	public DicDrugformLog() {
	}

	/** minimal constructor */
	public DicDrugformLog(String formId, String formCode, String formName) {
		this.formId = formId;
		this.formCode = formCode;
		this.formName = formName;
	}

	/** full constructor */
	public DicDrugformLog(String formId, String formCode, String formName,
			String fatherId, Integer status, Timestamp updDatetime,
			String updUser, Short sortId) {
		this.formId = formId;
		this.formCode = formCode;
		this.formName = formName;
		this.fatherId = fatherId;
		this.status = status;
		this.updDatetime = updDatetime;
		this.updUser = updUser;
		this.sortId = sortId;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "log_id", unique = true, nullable = false, length = 36)
	public String getLogId() {
		return this.logId;
	}

	public void setLogId(String logId) {
		this.logId = logId;
	}

	@Column(name = "form_id", nullable = false, length = 36)
	public String getFormId() {
		return this.formId;
	}

	public void setFormId(String formId) {
		this.formId = formId;
	}

	@Column(name = "form_code", nullable = false, length = 10)
	public String getFormCode() {
		return this.formCode;
	}

	public void setFormCode(String formCode) {
		this.formCode = formCode;
	}

	@Column(name = "form_name", nullable = false, length = 100)
	public String getFormName() {
		return this.formName;
	}

	public void setFormName(String formName) {
		this.formName = formName;
	}

	@Column(name = "father_id",insertable=false,updatable=false, length = 36)
	public String getFatherId() {
		return this.fatherId;
	}

	public void setFatherId(String fatherId) {
		this.fatherId = fatherId;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "upd_datetime", length = 19)
	public Date getUpdDatetime() {
		return this.updDatetime;
	}

	public void setUpdDatetime(Date date) {
		this.updDatetime = date;
	}

	@Column(name = "upd_user", length = 36)
	public String getUpdUser() {
		return this.updUser;
	}

	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}

	@Column(name = "sort_id")
	public Short getSortId() {
		return this.sortId;
	}

	public void setSortId(Short sortId) {
		this.sortId = sortId;
	}
	
	
	

	public String getFatherFormCode() {
		return fatherFormCode;
	}

	public void setFatherFormCode(String fatherFormCode) {
		this.fatherFormCode = fatherFormCode;
	}

	public String getFatherFormName() {
		return fatherFormName;
	}

	public void setFatherFormName(String fatherFormName) {
		this.fatherFormName = fatherFormName;
	}

	@ManyToOne(cascade=CascadeType.REFRESH,fetch=FetchType.EAGER)
	@NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name="father_id")
	public DicDrugform getDicDrugformCode() {
		return dicDrugformCode;
	}

	public void setDicDrugformCode(DicDrugform dicDrugformCode) {
		this.dicDrugformCode = dicDrugformCode;
	}

	 @Transient
	    public long getCount() {
			return count;
		}


		public void setCount(long count) {
			this.count = count;
		}
		
		
		
		
	

}